

function jqGridzcfx(js){
	$("#zcb").html("");
	$("#zcb").html("<table id='list48'></table><div id='plist48'></div>")
	cwzy_json = JSON.parse(js.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(cwzy_json.code != 1){
		return;
	}
	cwzy_json =cwzy_json.data
	var colModel = []
	var title = []
	var titleBar = cwzy_json.titleBar
	title.push("财务摘要(单位：百万)")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = cwzy_json.dataRow
	var typename=''
	var data1 = []
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
				if(sname.indexOf("同比") != -1 || sname.indexOf("率") != -1 || sname.indexOf("ROA") != -1|| sname.indexOf("ROE")!= -1){
					if(sname.indexOf("(次)") != -1){
						v = datas[j].toFixed(2) 
					}else{
						v = datas[j].toFixed(2)+"%"
					}
				}else if(sname.indexOf("(元/股)") != -1){
					v = datas[j].toFixed(2)
				}else{
					v = (datas[j] / 1000000.00).toFixed(2) 
				}
				}else{
					v = "-"
				}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
	
        jQuery("#list48").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist48",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "财务摘要"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list48').setGridWidth(width);
}

function zcfz_tables(zcfz_json){
	
	$("#zcb").html("");
	$("#zcb").html("<table id='list48'></table><div id='plist48'></div>")
	zcfz_json = JSON.parse(zcfz_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(zcfz_json.code != 1){
		return;
	}
	zcfz_json =zcfz_json.data
	var colModel = []
	var title = []
	var titleBar = zcfz_json.titleBar
	title.push("资产负债表(单位：百万)")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = zcfz_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
				if(sname.indexOf("同比") != -1 || sname.indexOf("率") != -1 || sname.indexOf("ROA") != -1|| sname.indexOf("ROE")!= -1){
					if(sname.indexOf("(次)") != -1){
						v = datas[j].toFixed(2) 
					}else{
						v = datas[j].toFixed(2)+"%"
					}
				}else if(sname.indexOf("(元/股)") != -1){
					v = datas[j].toFixed(2)
				}else{
					
					v = (datas[j] / 1000000).toFixed(2) 
				}
				}else{
					v = "-"
				}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list48").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist48",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "资产负债表"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list48').setGridWidth(width);
}
function lr_tables(lr_json){
	
	$("#zcb").html("");
	$("#zcb").html("<table id='list48'></table><div id='plist48'></div>")
	lr_json = JSON.parse(lr_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(lr_json.code != 1){
		return;
	}
	lr_json =lr_json.data
	var colModel = []
	var title = []
	var titleBar = lr_json.titleBar
	title.push("利润表(单位：百万)")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = lr_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
				if(sname.indexOf("同比") != -1 || sname.indexOf("率") != -1 || sname.indexOf("ROA") != -1|| sname.indexOf("ROE")!= -1){
					if(sname.indexOf("(次)") != -1){
						v = datas[j].toFixed(2) 
					}else{
						v = datas[j].toFixed(2)+"%"
					}
				}else if(sname.indexOf("(元/股)") != -1){
					v = datas[j].toFixed(2)
				}else{
					
					v = (datas[j] / 1000000).toFixed(2) 
				}
				}else{
					v = "-"
				}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list48").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist48",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "利润表"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list48').setGridWidth(width);
}
function xjll_tables(xjll_json){
	$("#zcb").html("");
	$("#zcb").html("<table id='list48'></table><div id='plist48'></div>")
	xjll_json = JSON.parse(xjll_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(xjll_json.code != 1){
		return;
	}
	xjll_json =xjll_json.data
	var colModel = []
	var title = []
	var titleBar = xjll_json.titleBar
	title.push("现金流量表(单位：百万)")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = xjll_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
				if(sname.indexOf("同比") != -1 || sname.indexOf("率") != -1 || sname.indexOf("ROA") != -1|| sname.indexOf("ROE")!= -1){
					if(sname.indexOf("(次)") != -1){
						v = datas[j].toFixed(2) 
					}else{
						v = datas[j].toFixed(2)+"%"
					}
				}else if(sname.indexOf("(元/股)") != -1){
					v = datas[j].toFixed(2)
				}else{
					
					v = (datas[j] / 1000000).toFixed(2) 
				}
				}else{
					v = "-"
				}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list48").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist48",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "现金流量表"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list48').setGridWidth(width);
}

function zygc_tables(zygc_json){
	$("#zcb").html("");
	$("#zcb").html("<table id='list48'></table><div id='plist48'></div>")
	zygc_json = JSON.parse(zygc_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(zygc_json.code != 1){
		return;
	}
	zygc_json =zygc_json.data
	var colModel = []
	var title = []
	var titleBar = zygc_json.titleBar
	title.push("主营构成表(单位：百万)")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = zygc_json.data
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
				if(sname.indexOf("同比") != -1 || sname.indexOf("率") != -1 || sname.indexOf("ROA") != -1|| sname.indexOf("ROE")!= -1){
					if(sname.indexOf("(次)") != -1){
						v = datas[j].toFixed(2) 
					}else{
						v = datas[j].toFixed(2)+"%"
					}
				}else if(sname.indexOf("(元/股)") != -1){
					v = datas[j].toFixed(2)
				}else{
					
					v = (datas[j] / 1000000).toFixed(2) 
				}
				}else{
					v = "-"
				}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list48").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist48",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "主营构成表"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list48').setGridWidth(width);
}
function mgzb_tables(mgzb_json){
	$("#cwzb").html("");
	$("#cwzb").html("<table id='list40'></table><div id='plist40'></div>")
	mgzb_json = JSON.parse(mgzb_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(mgzb_json.code != 1){
		return;
	}
	mgzb_json =mgzb_json.data
	var colModel = []
	var title = []
	var titleBar = mgzb_json.titleBar
	title.push("")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = mgzb_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
					v = datas[j].toFixed(2)
				}else{
					v = "-"
				}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list40").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist40",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "每股指标"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list40').setGridWidth(width);
}
function ylnl_tables(ylnl_json){
	$("#cwzb").html("");
	$("#cwzb").html("<table id='list40'></table><div id='plist40'></div>")
	ylnl_json = JSON.parse(ylnl_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(ylnl_json.code != 1){
		return;
	}
	ylnl_json =ylnl_json.data
	var colModel = []
	var title = []
	var titleBar = ylnl_json.titleBar
	title.push("盈利能力与收益质量")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = ylnl_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
					v = datas[j].toFixed(2)+"%"
				}else{
					v = "-"
				}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list40").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist40",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "盈利能力与收益质量"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list40').setGridWidth(width);
}

function zjjg_tables(zjjg_json){
	$("#cwzb").html("");
	$("#cwzb").html("<table id='list40'></table><div id='plist40'></div>")
	zjjg_json = JSON.parse(zjjg_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(zjjg_json.code != 1){
		return;
	}
	zjjg_json =zjjg_json.data
	var colModel = []
	var title = []
	var titleBar = zjjg_json.titleBar
	title.push("")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = zjjg_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
					if(sname.indexOf("同比") != -1 || sname.indexOf("率") != -1 || sname.indexOf("ROA") != -1|| sname.indexOf("ROE")!= -1){
						if(sname.indexOf("非筹资性现金") != -1 || sname.indexOf("(负债合计/归属母公司股东的权益)") != -1){
							v = datas[j].toFixed(2) 
						}else{
							v = datas[j].toFixed(2)+"%"
						}
					}else if(sname.indexOf("(元/股)") != -1){
						v = datas[j].toFixed(2)
					}else{
						
						v = (datas[j] / 1).toFixed(2) 
					}
					}else{
						v = "-"
					}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list40").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist40",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "资金结构与偿债能力"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list40').setGridWidth(width);
}

function yynl_tables(yynl_json){
	$("#cwzb").html("");
	$("#cwzb").html("<table id='list40'></table><div id='plist40'></div>")
	yynl_json = JSON.parse(yynl_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(yynl_json.code != 1){
		return;
	}
	yynl_json =yynl_json.data
	var colModel = []
	var title = []
	var titleBar = yynl_json.titleBar
	title.push("")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = yynl_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
					if(sname.indexOf("同比") != -1 || sname.indexOf("率") != -1 || sname.indexOf("ROA") != -1|| sname.indexOf("ROE")!= -1){
						if(sname.indexOf("非筹资性现金") != -1 || sname.indexOf("(负债合计/归属母公司股东的权益)") != -1){
							v = datas[j].toFixed(2) 
						}else{
							v = datas[j].toFixed(2)+"%"
						}
					}else if(sname.indexOf("(元/股)") != -1){
						v = datas[j].toFixed(2)
					}else{
						
						v = (datas[j] / 1).toFixed(2) 
					}
					}else{
						v = "-"
					}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list40").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist40",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "营运能力"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list40').setGridWidth(width);
}
function cznl_tables(cznl_json){
	$("#cwzb").html("");
	$("#cwzb").html("<table id='list40'></table><div id='plist40'></div>")
	cznl_json = JSON.parse(cznl_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(cznl_json.code != 1){
		return;
	}
	cznl_json =cznl_json.data
	var colModel = []
	var title = []
	var titleBar = cznl_json.titleBar
	title.push("")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = cznl_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
				v = datas[j].toFixed(2)+"%"
					}else{
						v = "-"
					}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list40").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist40",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "成长能力"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list40').setGridWidth(width);
}
function zb_xjll_tables(cznl_json){
	$("#cwzb").html("");
	$("#cwzb").html("<table id='list40'></table><div id='plist40'></div>")
	cznl_json = JSON.parse(cznl_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(cznl_json.code != 1){
		return;
	}
	cznl_json =cznl_json.data
	var colModel = []
	var title = []
	var titleBar = cznl_json.titleBar
	title.push("")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = cznl_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
				v = datas[j].toFixed(2)+"%"
					}else{
						v = "-"
					}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list40").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist40",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "现金流量"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list40').setGridWidth(width);
}

function cwbb_tables(cznl_json){
	$("#cwzb").html("");
	$("#cwzb").html("<table id='list40'></table><div id='plist40'></div>")
	cznl_json = JSON.parse(cznl_json.replace(/\r\n/g,"<br>").replace(/\n/g,"<br>"))
	if(cznl_json.code != 1){
		return;
	}
	cznl_json =cznl_json.data
	var colModel = []
	var title = []
	var titleBar = cznl_json.titleBar
	title.push("")
	colModel.push(JSON.parse("{'name':'name','index':'name', 'width':'220', 'sorttype':'int'}".replace(/'/g, '"')))
	for(var i=0;i<titleBar.length;i++){
		title.push(titleBar[i].interval)
		var ss = "{'name':'value"+i+"','index':'value"+i+"', 'width':'100', 'sorttype':'int'}"
		colModel.push(JSON.parse(ss.replace(/'/g, '"')))
	}
	var dataRow = cznl_json.dataRow
	var typename=''
	var data1 = []
	var k = 0;
	for(var i=0;i<dataRow.length;i++){
		if(dataRow[i].fdmtItemStyle.level ==1 ){
			typename = dataRow[i].fdmtItemStyle.name
		}else{
			var sname = dataRow[i].fdmtItemStyle.name
			var value ="{'name':'"+sname+"'"
			var datas = dataRow[i].data
			for(var j=0;j<datas.length;j++){
				var v
				var v1 =datas[j]
				if(!(!v1)){
					if(sname.indexOf("同比") != -1 || sname.indexOf("率") != -1 || sname.indexOf("ROA") != -1|| sname.indexOf("ROE")!= -1|| sname.indexOf("/")!= -1){
						if(sname.indexOf("非筹资性现金") != -1 || sname.indexOf("(负债合计/归属母公司股东的权益)") != -1){
							v = datas[j].toFixed(2) 
						}else{
							v = datas[j].toFixed(2)+"%"
						}
					}else if(sname.indexOf("(元/股)") != -1){
						v = datas[j].toFixed(2)
					}else{
						
						v = (datas[j] /1000000).toFixed(2) 
					}
					}else{
						v = "-"
					}
				value += ",'value"+j+"':'"+v+"'"
			}
			value +="}"
				value = value.replace(/'/g, '"')
			data1.push(JSON.parse(value))
		}
	}
        jQuery("#list40").jqGrid({
          data: data1,
          datatype: "local",
          height: 'auto',
          width:'auto',
          rowNum: 200,
          autowidth: true,
          shrinkToFit:false,  
          autoScroll: true, 
          rowList: [200],
             colNames:title,
             colModel:colModel,
             pager: "#plist40",
             viewrecords: true,
             sortname: 'name',
             grouping:true,
             /*groupingView : {
               groupField : ['name']
             },*/
             caption: "单季度财务报表"
        });
            var width = $('.tab-content').width()*0.96;
            $('#list40').setGridWidth(width);
}